<include file="default_header"/>
<body>
<div class="wraper">
	<div class="header bg-green">
		<p class="iconfont icon-iconfontuniversity"></p>
		<p>学生注册</p>
		<a href="javascript:history.back(-1)" class="back"><img src="/assets/base/center/images/return.png"/></a>
	</div>
	<div class="container">
		<p class="tips margin-b" style="display: none;">您还可以进行3次自动审核（3次失败后将转为人工审核）</p>

		<div class="form-list margin-b clearfix">
			<span class="field pull-left">姓名</span>
			<input class="form-control pull-left" placeholder="请输入您的真实姓名" id="real_name" value=""/>
			<p class="tips-icon">
				<span class="iconfont icon-zhengque icon-green right" ></span>
				<span class="iconfont icon-cuowu icon-red wrong" ></span>
			</p>
		</div>

		<div class="form-list margin-b clearfix">
			<span class="field pull-left">身份证号码</span>
			<input class="form-control pull-left" placeholder="请输入您的身份证号码" id="id_card" value=""/>
			<p class="tips-icon">
				<span class="iconfont icon-zhengque icon-green right" ></span>
				<span class="iconfont icon-cuowu icon-red wrong" ></span>
			</p>
		</div>

		<p class="tips validation-tips margin-b"></p>
		<div class="btn-box margin-b">
			<a href="javascript:void(0);" class="btn register">提交</a>
		</div>

	</div>
	<input type="hidden" id="type" value="0">
    <if condition="$remark">
        <include file="remark"/>
    </if>
	<div class="bottom-box">
		<p class="copyright">杭州青橄榄网络技术有限公司 技术支持</p>
	</div>
</div>

<include file="common_js"/>
<script type="text/javascript">
	var height = $(window).height();
	var bottombox_height = $('.bottom-box').outerHeight();
	$('.wraper').css("minHeight",height);
	$('.wraper').css("paddingBottom",bottombox_height);

	$(document).on('click','.register',function(){
		var data = {};
		data.id_card = $('#id_card').val();
		data.real_name = $('#real_name').val();
		data.type = 0;
		if (!data.real_name) {
			$('.validation-tips').html('姓名不能为空').show();
			return false;
		}
		if (!data.id_card) {

			$('.validation-tips').html('身份证号码不能为空').show();
			return false;
		}
		if (data.id_card.length != 15){
			if(data.id_card.length != 18){
				$('.validation-tips').html('请填写正确的身份证号码').show();
				return false;
			}
		}
		var json = {};
		json.method = 'post';
		json.type = 'json';
		json.url = "{BEESCRM::U('/base/User/doNewborn',array('account_id'=>$accountId))}";
		json.data = data;
		$.getAjax(json, true, reload, '');

	});
	function reload(data){
		var type = data.type;
		location.href="{BEESCRM::U('/base/User/tips',array('account_id'=>$accountId))}/type/"+type;
		//setTimeout("location.href ='{BEESCRM::U('base/center/center',array('wechat_id'=>$wechat_id))}'", 2000);
	}
</script>
</body>
</html>